﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Simulation
{
    public enum CommandType
    {
        Move,
        Fork,
        IdleFork,
        IdleMove,
        Connect,
        Disconnect,
        Exit
    }

    public class Command
    {
        private CommandType type;

        public Command(CommandType type)
        {
            this.type = type;
        }

        public Simulation.CommandType Type
        {
            get { return type; }
        }
    }


    public class MoveCommand : Command
    {
        private double power;
        private double tachoLimit;
        private double turnRatio;

        public MoveCommand(double power, double tachoLimit, double turnRatio) 
            : base(CommandType.Move)
        {
            this.power = power;
            this.tachoLimit = tachoLimit;
            this.turnRatio = turnRatio;
        }

        public double Power
        {
            get { return power; }
        }

        public double TachoLimit
        {
            get { return tachoLimit; }
        }

        public double TurnRatio
        {
            get { return turnRatio; }
        }
    }

    public class ControlForkCommand : Command
    {
        private double position;

        public ControlForkCommand(double position)
            : base(CommandType.Fork)
        {
            this.position = position;
        }

        public double Position
        {
            get { return position; }
        }
    }
}
